package com.seventeen.mq.proxy.server.proxy.ext;

import lombok.Data;
import org.apache.rocketmq.client.exception.MQClientException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 消费者代理实体类
 *
 * @author seventeen
 */
@Data
public abstract class BaseExtMqConsumer {

    private static final Logger LOGGER = LoggerFactory.getLogger(BaseExtMqConsumer.class);
    protected static final int DEFAULT_BATCH_MAX_SIZE = 30;
    protected final int batchMaxSize = DEFAULT_BATCH_MAX_SIZE;
    /**
     * ID
     */
    protected Long id;

    protected String consumerProxyGroup;

    protected String topic;

    protected String tags;

    protected String appUrl;

    protected String type;

    protected String version;

    /**
     * 访问Key
     */
    protected String accessKey;
    /**
     * 访问Secret
     */
    protected String secretKey;
    /**
     * 端点
     */
    protected String endpoints;
    /**
     * 删除标志（0代表存在 2代表删除）
     */
    protected String delFlag;

    /**
     * 初始化
     *
     * @throws MQClientException
     */
    public abstract void init();

    /**
     * 销毁
     */
    public abstract void destroy();
}
